drop table jms_ods.ep_create_institution_detail;
CREATE EXTERNAL TABLE jms_ods.ep_create_institution_detail(
  `id` bigint COMMENT '主键',
  `create_institution_id` bigint COMMENT '建组表id',
  `post_code` string COMMENT '岗位编码',
  `post_name` string COMMENT '岗位名称',
  `linked_method` string COMMENT '关联数据计件方式:转运中心装车,转运中心卸车,转运中心建包,转运中心拆包',
  `employ_code` string COMMENT '员工工号',
  `employ_name` string COMMENT '员工姓名',
  `sign_in_time` string COMMENT '签到时间',
  `sign_out_time` string COMMENT '签出时间',
  `work_hours` int COMMENT '工时（小时）',
  `operate_num` int COMMENT '操作量',
  `remark` string COMMENT '备注',
  `create_by` bigint COMMENT '创建id',
  `create_by_code` string COMMENT '创建code',
  `create_by_name` string COMMENT '创建name',
  `create_time` string COMMENT '创建时间',
  `update_by` bigint COMMENT '更新id',
  `update_by_code` string COMMENT '更新code',
  `update_by_name` string COMMENT '更新name',
  `update_time` string COMMENT '更新时间',
  `sn_code` string COMMENT '设备编码',
  SUSPEND_COST bigint COMMENT'暂停(分钟)',
  EMPLOY_TYPE bigint COMMENT'员工属性 1临时工/2正式工',
  OUTSOURCE_COMPANY_ID bigint COMMENT'外包公司主键id',
  OUTSOURCE_COMPANY_NAME string COMMENT'外包公司名称',
  EMPLOY_WEIGHT bigint COMMENT'员工操作重量',
  QUESTION_TYPE string COMMENT'异常原因',
  CALCULATE_TYPE bigint COMMENT'结算类型 1-计件 2-计重',
  UNPACK_FLAG bigint COMMENT'是否拆包0-否 1-是')
COMMENT '建组信息明细表'
PARTITIONED BY (
  `dt` string COMMENT '时间分区(yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/jms_ods.db/external/ep_create_institution_detail'
TBLPROPERTIES (
    'parquet.column.index.access' = 'true'
);

msck repair table jms_ods.ep_create_institution_detail;